package com.shop.cereshop.business.dl.logic.service.Impl;

import com.shop.cereshop.business.dao.dl.CareShopColumnDao;
import com.shop.cereshop.business.dl.logic.domian.CareShopColumn;
import com.shop.cereshop.business.dl.logic.service.CareShopColumnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: 况鑫威
 * @Date: 2021/6/16
 * @Time: 11:49
 * @ClassName: CareShopColumnServiceimpl
 * @Description: com.shop.cereshop.business.dl.logic.service.serviceImpl
 */
@Service
public class CareShopColumnServiceimpl implements CareShopColumnService {
    @Autowired
    private CareShopColumnDao careShopColumnDao;

    @Override
    public int deleteByPrimaryKey(Long columnid) {
        return careShopColumnDao.deleteByPrimaryKey(columnid);
    }

    @Override
    public int insert(CareShopColumn record) {
        return careShopColumnDao.insert(record);
    }

    @Override
    public int insertSelective(CareShopColumn record) {
        return careShopColumnDao.insertSelective(record);
    }

    @Override
    public CareShopColumn selectByPrimaryKey(Long columnid) {
        return careShopColumnDao.selectByPrimaryKey(columnid);
    }

    @Override
    public int updateByPrimaryKeySelective(CareShopColumn record) {
        return careShopColumnDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(CareShopColumn record) {
        return careShopColumnDao.updateByPrimaryKey(record);
    }

    @Override
    public List<CareShopColumn> getAll() {
        return careShopColumnDao.getAll();
    }

    @Override
    public int add(String title) {
        CareShopColumn careShopColumn = new CareShopColumn();
        careShopColumn.setTitle(title);
        return careShopColumnDao.insertSelective(careShopColumn);
    }

}
